package siyuan.run.nacos.security.oauth2.redis.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import siyuan.run.nacos.security.oauth2.redis.repository.UserRepository;
import siyuan.run.nacos.security.oauth2.redis.service.UserService;
import siyuan.run.nacos.security.oauth2.redis.model.User;

import java.util.List;

/**
 * @program: sy
 * @description:
 * @author: SY
 * @create: 2020-12-20 21:55
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserRepository userRepository;

    @Override
    public User save(User user) {
        return userRepository.save(user);
    }

    @Override
    public List<User> findAll() {
        return userRepository.findAll();
    }
}
